## API Report File for "@backstage/plugin-scaffolder-react"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
/// <reference types="react" />

import { ApiHolder } from '@backstage/core-plugin-api';
import { ApiRef } from '@backstage/core-plugin-api';
import { ComponentType } from 'react';
import { CustomValidator } from '@rjsf/utils';
import { ElementType } from 'react';
import { ErrorSchema } from '@rjsf/utils';
import { ErrorTransformer } from '@rjsf/utils';
import { Experimental_DefaultFormStateBehavior } from '@rjsf/utils';
import { Extension } from '@backstage/core-plugin-api';
import { FieldValidation } from '@rjsf/utils';
import Form from '@rjsf/core';
import { FormContextType } from '@rjsf/utils';
import { FormEvent } from 'react';
import type { FormProps as FormProps_2 } from '@rjsf/core';
import { GenericObjectType } from '@rjsf/utils';
import { HTMLAttributes } from 'react';
import { IChangeEvent } from '@rjsf/core';
import { IdSchema } from '@rjsf/utils';
import { JsonObject } from '@backstage/types';
import { JSONSchema7 } from 'json-schema';
import { JsonValue } from '@backstage/types';
import { Observable } from '@backstage/types';
import { PropsWithChildren } from 'react';
import { default as React_2 } from 'react';
import { ReactNode } from 'react';
import { Ref } from 'react';
import { Registry } from '@rjsf/utils';
import { RegistryWidgetsType } from '@rjsf/utils';
import { RJSFSchema } from '@rjsf/utils';
import { RJSFValidationError } from '@rjsf/utils';
import { StrictRJSFSchema } from '@rjsf/utils';
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
import { TaskStep } from '@backstage/plugin-scaffolder-common';
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
import { TemplatePresentationV1beta3 } from '@backstage/plugin-scaffolder-common';
import { TemplatesType } from '@rjsf/utils';
import { UIOptionsType } from '@rjsf/utils';
import { UiSchema } from '@rjsf/utils';
import { ValidatorType } from '@rjsf/utils';

// @public
export type Action = {
  id: string;
  description?: string;
  schema?: {
    input?: JSONSchema7;
    output?: JSONSchema7;
  };
  examples?: ActionExample[];
};

// @public
export type ActionExample = {
  description: string;
  example: string;
};

// @public
export function createScaffolderFieldExtension<
  TReturnValue = unknown,
  TInputProps extends UIOptionsType = {},
>(
  options: FieldExtensionOptions<TReturnValue, TInputProps>,
): Extension<FieldExtensionComponent<TReturnValue, TInputProps>>;

// @public
export function createScaffolderLayout<TInputProps = unknown>(
  options: LayoutOptions,
): Extension<LayoutComponent<TInputProps>>;

// @public
export type CustomFieldExtensionSchema = {
  returnValue: JSONSchema7;
  uiOptions?: JSONSchema7;
};

// @public
export type CustomFieldValidator<TFieldReturnValue, TUiOptions = unknown> = (
  data: TFieldReturnValue,
  field: FieldValidation,
  context: {
    apiHolder: ApiHolder;
    formData: JsonObject;
    schema: JsonObject;
    uiSchema?: FieldExtensionUiSchema<TFieldReturnValue, TUiOptions>;
  },
) => void | Promise<void>;

// @public
export type FieldExtensionComponent<_TReturnValue, _TInputProps> = () => null;

// @public
export interface FieldExtensionComponentProps<
  TFieldReturnValue,
  TUiOptions = {},
> extends PropsWithChildren<ScaffolderRJSFFieldProps<TFieldReturnValue>> {
  // (undocumented)
  uiSchema: FieldExtensionUiSchema<TFieldReturnValue, TUiOptions>;
}

// @public
export type FieldExtensionOptions<
  TFieldReturnValue = unknown,
  TUiOptions = unknown,
> = {
  name: string;
  component: (
    props: FieldExtensionComponentProps<TFieldReturnValue, TUiOptions>,
  ) => JSX.Element | null;
  validation?: CustomFieldValidator<TFieldReturnValue, TUiOptions>;
  schema?: CustomFieldExtensionSchema;
};

// @public
export interface FieldExtensionUiSchema<TFieldReturnValue, TUiOptions>
  extends UiSchema<TFieldReturnValue> {
  // (undocumented)
  'ui:options'?: TUiOptions & UIOptionsType<TFieldReturnValue>;
}

// @public
export type FormProps = Pick<
  FormProps_2,
  'transformErrors' | 'noHtml5Validate'
>;

// @public
export type LayoutComponent<_TInputProps> = () => null;

// @public
export interface LayoutOptions<P = any> {
  // (undocumented)
  component: LayoutTemplate<P>;
  // (undocumented)
  name: string;
}

// @public
export type LayoutTemplate<T = any> = NonNullable<
  FormProps_2<T>['uiSchema']
>['ui:ObjectFieldTemplate'];

// @public
export type ListActionsResponse = Array<Action>;

// @public
export type LogEvent = {
  type: 'log' | 'completion' | 'cancelled' | 'recovered';
  body: {
    message: string;
    stepId?: string;
    status?: ScaffolderTaskStatus;
  };
  createdAt: string;
  id: string;
  taskId: string;
};

// @public
export type ReviewStepProps = {
  disableButtons: boolean;
  formData: JsonObject;
  handleBack: () => void;
  handleReset: () => void;
  handleCreate: () => void;
  steps: {
    uiSchema: UiSchema;
    mergedSchema: JsonObject;
    schema: JsonObject;
  }[];
};

// @public
export interface ScaffolderApi {
  cancelTask(taskId: string): Promise<void>;
  // (undocumented)
  dryRun?(options: ScaffolderDryRunOptions): Promise<ScaffolderDryRunResponse>;
  // (undocumented)
  getIntegrationsList(
    options: ScaffolderGetIntegrationsListOptions,
  ): Promise<ScaffolderGetIntegrationsListResponse>;
  // (undocumented)
  getTask(taskId: string): Promise<ScaffolderTask>;
  // (undocumented)
  getTemplateParameterSchema(
    templateRef: string,
  ): Promise<TemplateParameterSchema>;
  listActions(): Promise<ListActionsResponse>;
  // (undocumented)
  listTasks?(options: { filterByOwnership: 'owned' | 'all' }): Promise<{
    tasks: ScaffolderTask[];
  }>;
  scaffold(
    options: ScaffolderScaffoldOptions,
  ): Promise<ScaffolderScaffoldResponse>;
  // (undocumented)
  streamLogs(options: ScaffolderStreamLogsOptions): Observable<LogEvent>;
}

// @public (undocumented)
export const scaffolderApiRef: ApiRef<ScaffolderApi>;

// @public (undocumented)
export interface ScaffolderDryRunOptions {
  // (undocumented)
  directoryContents: {
    path: string;
    base64Content: string;
  }[];
  // (undocumented)
  secrets?: Record<string, string>;
  // (undocumented)
  template: JsonValue;
  // (undocumented)
  values: JsonObject;
}

// @public (undocumented)
export interface ScaffolderDryRunResponse {
  // (undocumented)
  directoryContents: Array<{
    path: string;
    base64Content: string;
    executable: boolean;
  }>;
  // (undocumented)
  log: Array<Pick<LogEvent, 'body'>>;
  // (undocumented)
  output: ScaffolderTaskOutput;
  // (undocumented)
  steps: TaskStep[];
}

// @public
export const ScaffolderFieldExtensions: React.ComponentType<
  React.PropsWithChildren<{}>
>;

// @public
export interface ScaffolderGetIntegrationsListOptions {
  // (undocumented)
  allowedHosts: string[];
}

// @public
export interface ScaffolderGetIntegrationsListResponse {
  // (undocumented)
  integrations: {
    type: string;
    title: string;
    host: string;
  }[];
}

// @public
export const ScaffolderLayouts: React_2.ComponentType<
  React_2.PropsWithChildren<{}>
>;

// @public (undocumented)
export type ScaffolderOutputLink = {
  title?: string;
  icon?: string;
  url?: string;
  entityRef?: string;
};

// @public (undocumented)
export type ScaffolderOutputText = {
  title?: string;
  icon?: string;
  content?: string;
  default?: boolean;
};

// @public
export type ScaffolderRJSFField<
  T = any,
  S extends StrictRJSFSchema = RJSFSchema,
  F extends FormContextType = any,
> = ComponentType<ScaffolderRJSFFieldProps<T, S, F>>;

// @public
export interface ScaffolderRJSFFieldProps<
  T = any,
  S extends StrictRJSFSchema = RJSFSchema,
  F extends FormContextType = any,
> extends GenericObjectType,
    Pick<
      HTMLAttributes<HTMLElement>,
      Exclude<
        keyof HTMLAttributes<HTMLElement>,
        'onBlur' | 'onFocus' | 'onChange'
      >
    > {
  autofocus?: boolean;
  disabled: boolean;
  errorSchema?: ErrorSchema<T>;
  formContext?: F;
  formData: T;
  hideError?: boolean;
  idPrefix?: string;
  idSchema: IdSchema<T>;
  idSeparator?: string;
  name: string;
  onBlur: (id: string, value: any) => void;
  onChange: (
    newFormData: T | undefined,
    es?: ErrorSchema<T>,
    id?: string,
  ) => any;
  onFocus: (id: string, value: any) => void;
  rawErrors: string[];
  readonly: boolean;
  registry: Registry<T, S, F>;
  required?: boolean;
  schema: S;
  uiSchema: UiSchema<T, S, F>;
}

// @public
export interface ScaffolderRJSFFormProps<
  T = any,
  S extends StrictRJSFSchema = RJSFSchema,
  F extends FormContextType = any,
> {
  acceptcharset?: string;
  action?: string;
  autoComplete?: string;
  children?: ReactNode;
  className?: string;
  customValidate?: CustomValidator<T, S, F>;
  disabled?: boolean;
  enctype?: string;
  experimental_defaultFormStateBehavior?: Experimental_DefaultFormStateBehavior;
  extraErrors?: ErrorSchema<T>;
  fields?: ScaffolderRJSFRegistryFieldsType<T, S, F>;
  focusOnFirstError?: boolean | ((error: RJSFValidationError) => void);
  formContext?: F;
  formData?: T;
  id?: string;
  idPrefix?: string;
  idSeparator?: string;
  _internalFormWrapper?: ElementType;
  liveOmit?: boolean;
  liveValidate?: boolean;
  method?: string;
  name?: string;
  noHtml5Validate?: boolean;
  // @deprecated
  noValidate?: boolean;
  omitExtraData?: boolean;
  onBlur?: (id: string, data: any) => void;
  onChange?: (data: IChangeEvent<T, S, F>, id?: string) => void;
  onError?: (errors: RJSFValidationError[]) => void;
  onFocus?: (id: string, data: any) => void;
  onSubmit?: (data: IChangeEvent<T, S, F>, event: FormEvent<any>) => void;
  readonly?: boolean;
  ref?: Ref<Form<T, S, F>>;
  schema: S;
  showErrorList?: false | 'top' | 'bottom';
  tagName?: ElementType;
  target?: string;
  templates?: Partial<Omit<TemplatesType<T, S, F>, 'ButtonTemplates'>> & {
    ButtonTemplates?: Partial<TemplatesType<T, S, F>['ButtonTemplates']>;
  };
  transformErrors?: ErrorTransformer<T, S, F>;
  translateString?: Registry['translateString'];
  uiSchema?: UiSchema<T, S, F>;
  validator: ValidatorType<T, S, F>;
  widgets?: RegistryWidgetsType<T, S, F>;
}

// @public
export type ScaffolderRJSFRegistryFieldsType<
  T = any,
  S extends StrictRJSFSchema = RJSFSchema,
  F extends FormContextType = any,
> = {
  [name: string]: ScaffolderRJSFField<T, S, F>;
};

// @public
export interface ScaffolderScaffoldOptions {
  // (undocumented)
  secrets?: Record<string, string>;
  // (undocumented)
  templateRef: string;
  // (undocumented)
  values: Record<string, JsonValue>;
}

// @public
export interface ScaffolderScaffoldResponse {
  // (undocumented)
  taskId: string;
}

// @public
export type ScaffolderStep = {
  id: string;
  status: ScaffolderTaskStatus;
  endedAt?: string;
  startedAt?: string;
};

// @public
export interface ScaffolderStreamLogsOptions {
  // (undocumented)
  after?: number;
  // (undocumented)
  taskId: string;
}

// @public
export type ScaffolderTask = {
  id: string;
  spec: TaskSpec;
  status: 'failed' | 'completed' | 'processing' | 'open' | 'cancelled';
  lastHeartbeatAt: string;
  createdAt: string;
};

// @public (undocumented)
export type ScaffolderTaskOutput = {
  links?: ScaffolderOutputLink[];
  text?: ScaffolderOutputText[];
} & {
  [key: string]: unknown;
};

// @public
export type ScaffolderTaskStatus =
  | 'cancelled'
  | 'completed'
  | 'failed'
  | 'open'
  | 'processing'
  | 'skipped';

// @public
export interface ScaffolderUseTemplateSecrets {
  // (undocumented)
  secrets: Record<string, string>;
  // (undocumented)
  setSecrets: (input: Record<string, string>) => void;
}

// @public
export const SecretsContextProvider: (
  props: PropsWithChildren<{}>,
) => React_2.JSX.Element;

// @public
export type TaskStream = {
  cancelled: boolean;
  loading: boolean;
  error?: Error;
  stepLogs: {
    [stepId in string]: string[];
  };
  completed: boolean;
  task?: ScaffolderTask;
  steps: {
    [stepId in string]: ScaffolderStep;
  };
  output?: ScaffolderTaskOutput;
};

// @public (undocumented)
export type TemplateGroupFilter = {
  title?: React.ReactNode;
  filter: (entity: TemplateEntityV1beta3) => boolean;
};

// @public
export type TemplateParameterSchema = {
  title: string;
  description?: string;
  presentation?: TemplatePresentationV1beta3;
  steps: Array<{
    title: string;
    description?: string;
    schema: JsonObject;
  }>;
};

// @public
export const useCustomFieldExtensions: <
  TComponentDataType = FieldExtensionOptions,
>(
  outlet: React.ReactNode,
) => TComponentDataType[];

// @public
export const useCustomLayouts: <TComponentDataType = LayoutOptions<any>>(
  outlet: React.ReactNode,
) => TComponentDataType[];

// @public
export const useTaskEventStream: (taskId: string) => TaskStream;

// @public
export const useTemplateSecrets: () => ScaffolderUseTemplateSecrets;

// (No @packageDocumentation comment for this package)
```
